package com.ruoyi.system.service;

import com.ruoyi.system.domain.Article;
import com.ruoyi.system.domain.vo.DetailedArticle;
import com.ruoyi.system.domain.vo.FirstPageArticle;
import com.ruoyi.system.domain.vo.ShowArticle;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public interface ArticleService {

    List<Article> getAllArticles();

    FirstPageArticle getArticleById(Long id);

    List<ShowArticle> getArticleTagById(Long tagId);
    List<FirstPageArticle> getArticleTagByUserId(Long userid);
    int saveArticle(Article article);

    int updateArticle(ShowArticle showArticle);

    void deleteArticle(Long id);

    /*======================首页接口=========================*/
    List<FirstPageArticle> getFirstAllArticles();

    List<FirstPageArticle> getSearchArticles(String query);

    DetailedArticle getDetailedArticle(Long id);

    Integer getArticleViewTotal();

    List<FirstPageArticle> getArticleInfoId(String query,Long tagId);

    List<FirstPageArticle> getArticleTagId(Long tagId);

}
